package cn.wolfcode.luowowo.gold.domain;

import cn.wolfcode.luowowo.common.domain.BaseDomain;
import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Specification extends BaseDomain{


    private String specificationName;

    private BigDecimal specificationActualPrice;

    private Long productId;

    private Integer specificationNum;

    private String productName;

    private String specificationImg;

    private BigDecimal specificationOriginalPrice;

    private Integer convertGoldNum;

    private Integer salesNum;

    public String getJsonStr(){
        Map<String,Object>map=new HashMap<>();
        map.put("productId",productId);
        map.put("id",this.getId());
        map.put("specificationActualPrice",specificationActualPrice.toString());
        map.put("specificationNum",specificationNum);
        map.put("productName",productName);
        map.put("specificationName",specificationName);
        map.put("specificationImg",specificationImg);
        map.put("specificationOriginalPrice",specificationOriginalPrice.toString());
        map.put("convertGoldNum",convertGoldNum);
        return JSON.toJSONString(map);



    }


}